<template>
	<view class="content">
		<view class="search">
			<u-search shape="square" bg-color="white" placeholder="搜索" input-align="center" :show-action="false">
			</u-search>
		</view>
		<view class="flex">
			<view class="left" >
				<view @click="changeMenu(index)" v-for="(item,index) in arr" class="menu " :class="index==activeIndex ? 'active' : '' ">
					{{item}}
				</view>
			</view>
			<view class="right">
				<view @click="goPage" v-for="item in 5" style="margin: 10rpx;">
					<view class="flex" >
						
							<img style="width: 150rpx;height: 200rpx;margin-right: 10rpx;"
								src="/static/images/login/logo.png" />
							<view style="display: flex;flex-direction: column;justify-content: space-between;">
								<view style="font-size: 20rpx;">polo衬衫定制工作服刺绣印字logo企业短袖T恤文化...</view>
								<view class="flex" style="justify-content: space-between;">
									<view>￥30</view>
									<view>
										<u-number-box color="red" v-model="value"></u-number-box>
									</view>
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
</template>

<script>
	export default {
		data() {
			return {
				arr: ["家居", '文件', '生活', '工艺'],
				value: 0,
				activeIndex:0
			}
		},
		methods: {
			changeMenu(index){
				this.activeIndex = index;
			},
			goPage(){
				uni.navigateTo({
					url:"/pages/detail/detail"
				})
			}
		}
	}
</script>

<style>
	.active{
		color: red;
		border-left: solid red 8rpx;
	}
	.menu {
		text-align: center;
		height: 80rpx;
		line-height: 80rpx;
		font-weight: bold;
	}

	.flex {
		display: flex;
		margin-top: 20rpx;
	}

	.left {
		width: 200rpx;

	}

	.right {
		background-color: white;
		flex: 1
	}
</style>
